<div>
	<table id="form_table">
		<input type="hidden" id="stay" name="dialog_stay_id" value="{stay_id}" />
		<tr>
			<td id="caption">Үйлчилэгч</td>
			<td><select name="dialog_stay_employee">
					{select_stay_employee}
			</select></td>
		</tr>
		<tr>
			<td id="caption">Маяг</td>
			<td><select name="dialog_stay_type" id="dialog_stay_type">
					{select_stay_type}
			</select></td>
		</tr>
		<tr id="dialog_row_stay_training_type"{training_type_visible}>
			<td id="caption">Сургалт</td>
			<td><select name="dialog_stay_training_type">
					{select_stay_training_type}
			</select></td>
		</tr>
		<tr>
			<td id="caption">Эхлэх</td>
			<td><input type="text" id="dialog_stay_start_date"
				name="dialog_stay_start_date" value="{value_stay_start_date}" /> <input
				type="text" id="dialog_stay_start_time"
				name="dialog_stay_start_time" value="{value_stay_start_time}" /></td>
		</tr>
		<tr>
			<td id="caption">Дуусах</td>
			<td><input type="text" id="dialog_stay_end_date"
				name="dialog_stay_end_date" value="{value_stay_end_date}" /> <input
				type="text" id="dialog_stay_end_time" name="dialog_stay_end_time"
				value="{value_stay_end_time}" /></td>
		</tr>
		<tr>
			<td id="caption">Байршил</td>
			<td><select name="dialog_stay_location">
					{select_stay_location}
			</select></td>
		</tr>
		<tr>
			<td colspan="2" align="right"><input type="button"
				id="btn_save_stay" class="btn_div" name="{save}" value="Хадгалах" />
				<input type="button" id="btn_cancel_stay" class="btn_div"
				name="{cancel}" value="Цуцлах" /></td>
		</tr>
	</table>
</div>
<script>
	$(function() {
		$("#dialog_stay_type").change(function(){
			if ($(this).val() == "TRAINING")
				$("#dialog_row_stay_training_type").show('slow');
			else
				$("#dialog_row_stay_training_type").hide('slow');
		});
		$("#dialog_stay_start_date").datepicker({
			dateFormat: 'yy/mm/dd'
		});
		$("#dialog_stay_start_time").timepicker();
		$("#dialog_stay_end_date").datepicker({
			dateFormat: 'yy/mm/dd'
		});
		$("#dialog_stay_end_time").timepicker();
	});
</script>